import io from '@/utils/request';

export default {
  // 中间商登录
  fetchLogin(data) {
    let opts = {
      url: `/api/boss/login`,
    };
    return io(opts.url, data, 'POST');
  },

  fetchDict(data) {
    let opts = {
      url: '/system/dict/data/dictType/' + data.dictType,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单列表
  fetchOrderList(data) {
    let opts = {
      url: `/order/order/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单详情
  fetchOrderDetail(data) {
    let opts = {
      url: `/order/order/${data.data.id}`,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单邮寄地址
  fetchOrderContactAddr(data) {
    let opts = {
      url: `/order/addr/orderId/${data.data.orderId}`,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单图片
  fetchOrderImg(data) {
    let opts = {
      url: `/order/img/orderImg/${data.data.orderId}`,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单取消
  fetchOrderCancel(data) {
    let opts = {
      url: `/order/order/cancel/${data.data.orderId}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 订单退款
  fetchOrderRefund(data) {
    let opts = {
      url: `/order/refund/create/${data.data.orderId}`,
    };
    return io(opts.url, data, 'POST');
  },
  fetchOrderTkRefund(data) {
    let opts = {
      url: `/order/refund/bfRefund`,
    };
    return io(opts.url, data, 'POST');
  },

  // 订单退款列表
  fetchRefundList(data) {
    let opts = {
      url: `/order/refund/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 订单退款查询
  fetchRefundQuery(data) {
    let opts = {
      url: `/order/refund/query/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 订单退款审核
  fetchRefundAudit(data) {
    let opts = {
      url: `/order/refund/audit`,
    };
    return io(opts.url, data, 'POST');
  },

  // 订单退款预校验
  fetchRefundPreCheck(data) {
    let opts = {
      url: `/order/refund/preCheck/` + data.data.type + '/' + data.data.orderId,
    };
    return io(opts.url, data, 'POST');
  },

  // 订单原路退款
  fetchOnlineRefund(data) {
    let opts = {
      url: `/order/refund/refund/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 订单线下退款
  fetchOutlineRefund(data) {
    let opts = {
      url: `/order/refund/manu`,
    };
    return io(opts.url, data, 'POST');
  },

  // 免检受理
  fetchOrderMjsl(data) {
    let opts = {
      url: `/order/order/mjsl/${data.data.orderId}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 手动完成
  fetchOrderManelFinish(data) {
    let opts = {
      url: `/order/order/finish/${data.data.orderId}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 免检完结
  fetchOrderMjwj(data) {
    let opts = {
      url: `/order/order/mjwj`,
    };
    return io(opts.url, data, 'POST');
  },

  // 会员信息
  fetchMemberDetail(data) {
    let opts = {
      url: `/member/member/${data.data.memberId}`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员列表
  fetchMemberList(data) {
    let opts = {
      url: `/member/member/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员账户
  fetchMemberAccountList(data) {
    let opts = {
      url: `/member/account/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员账单
  fetchMemberAccountBillList(data) {
    let opts = {
      url: `/member/bill/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员提现
  fetchMemberWirthdrawList(data) {
    let opts = {
      url: `/member/withdraw/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员提现审核
  fetchMemberWirthdrawAudit(data) {
    let opts = {
      url: `/member/withdraw/audit`,
    };
    return io(opts.url, data, 'POST');
  },

  // 会员提现线下打款
  fetchMemberWirthdrawXxdk(data) {
    let opts = {
      url: `/member/withdraw/xxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 会员提现微信打款
  fetchMemberWirthdrawXsdk(data) {
    let opts = {
      url: `/member/withdraw/wxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 会员修改
  fetchMemberEdit(data) {
    let opts = {
      url: `/member/member`,
    };
    return io(opts.url, data, 'PUT');
  },

  fetchMembermsgSend(data) {
    let opts = {
      url: `/member/member/msgSend`,
    };
    return io(opts.url, data, 'POST');
  },
  // 会员开票列表
  fetchMemberTaxList(data) {
    let opts = {
      url: `/member/tax/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员开票修改
  fetchMemberTaxEdit(data) {
    let opts = {
      url: `/member/tax`,
    };
    return io(opts.url, data, 'PUT');
  },

  // 意见反馈列表
  fetchFeedbackList(data) {
    let opts = {
      url: `/cms/feedback/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 会员车辆列表
  fetchMemberCarList(data) {
    let opts = {
      url: `/member/car/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 司机列表
  fetchDriverList(data) {
    let opts = {
      url: `/driver/driver/list`,
    };
    return io(opts.url, data, 'GET');
  },

  // 司机信息
  fetchDriverDetail(data) {
    let opts = {
      url: `/driver/driver/${data.data.driverId}`,
    };
    return io(opts.url, data, 'GET');
  },
  // 司机修改
  fetchDriverEdit(data) {
    let opts = {
      url: `/driver/driver`,
    };
    return io(opts.url, data, 'PUT');
  },
  // 司机info
  fetchDriverInfo(data) {
    let opts = {
      url: `/driver/driver/info/${data.data.driverId}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 司机info
  fetchDriverZp(data) {
    let opts = {
      url: `/order/order/zpDriver/${data.data.orderId}/${data.data.driverId}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 司机分配检测站
  fetchDriverFp(data) {
    let opts = {
      url: `/driver/driver/chooseStation/${data.data.driverId}/${data.data.stationId}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 司机账户
  fetchDriverAccountList(data) {
    let opts = {
      url: `/driver/account/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 司机账户押金
  fetchDriverAccountEditDeposit(data) {
    let opts = {
      url: `/driver/account/editDeposit`,
    };
    return io(opts.url, data, 'POST');
  },
  // 司机账单
  fetchDriverAccountBillList(data) {
    let opts = {
      url: `/driver/bill/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 司机提现
  fetchDriverWrithdrawList(data) {
    let opts = {
      url: `/driver/withdraw/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 司机提现审核
  fetchDriverWirthdrawAudit(data) {
    let opts = {
      url: `/driver/withdraw/audit`,
    };
    return io(opts.url, data, 'POST');
  },

  // 司机提现线下打款
  fetchDriverWirthdrawXxdk(data) {
    let opts = {
      url: `/driver/withdraw/xxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 司机提现微信打款
  fetchDriverWirthdrawXsdk(data) {
    let opts = {
      url: `/driver/withdraw/wxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 检测站列表
  fetchStationList(data) {
    let opts = {
      url: `/station/station/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站信息
  fetchStationDetail(data) {
    let opts = {
      url: `/station/station/${data.data.stationId}`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站用户
  fetchStationUserList(data) {
    let opts = {
      url: `/station/user/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站用户
  fetchStationUserAdd(data) {
    let opts = {
      url: `/station/user`,
    };
    return io(opts.url, data, 'POST');
  },
  // 检测站用户
  fetchStationUserEdit(data) {
    let opts = {
      url: `/station/user`,
    };
    return io(opts.url, data, 'PUT');
  },
  // 检测站新增
  fetchStationAdd(data) {
    let opts = {
      url: `/station/station`,
    };
    return io(opts.url, data, 'POST');
  },
  // 检测站修改
  fetchStationEdit(data) {
    let opts = {
      url: `/station/station`,
    };
    return io(opts.url, data, 'PUT');
  },
  // 检测站账户
  fetchStationAccountList(data) {
    let opts = {
      url: `/station/account/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站押金
  fetchStationDeposit(data) {
    let opts = {
      url: `/station/account/editDeposit`,
    };
    return io(opts.url, data, 'POST');
  },
  // 检测站账单
  fetchStationAccountBillList(data) {
    let opts = {
      url: `/station/bill/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站提现
  fetchStationWrithdrawList(data) {
    let opts = {
      url: `/station/withdraw/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站提现审核
  fetchStationWirthdrawAudit(data) {
    let opts = {
      url: `/station/withdraw/audit`,
    };
    return io(opts.url, data, 'POST');
  },

  // 检测站提现线下打款
  fetchStationWirthdrawXxdk(data) {
    let opts = {
      url: `/station/withdraw/xxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 检测站提现微信打款
  fetchStationWirthdrawXsdk(data) {
    let opts = {
      url: `/station/withdraw/wxpay/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 检测站指派
  fetchStationZp(data) {
    let opts = {
      url: `/order/order/zpStation/${data.data.orderId}/${data.data.stationId}`,
    };
    return io(opts.url, data, 'POST');
  },

  // 加载办理城市
  fetchAreaList(data) {
    let opts = {
      url: `/area/area/cascader`,
    };
    return io(opts.url, data, 'GET');
  },
  // 检测站账单
  fetchChartAccountOverview(data) {
    let opts = {
      url: `/chart/plat/account/overview`,
    };
    return io(opts.url, data, 'GET');
  },
  // 车辆过户列表
  fetchCarTransferList(data) {
    let opts = {
      url: `/car/transfer/list`,
    };
    return io(opts.url, data, 'GET');
  },
  // 车辆过户列表
  fetchCarTransferSl(data) {
    let opts = {
      url: `/car/transfer/sl/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },
  // 车辆过户列表
  fetchCarTransferWj(data) {
    let opts = {
      url: `/car/transfer/wj/${data.data.id}`,
    };
    return io(opts.url, data, 'POST');
  },
};
